package cn.hss.object.abstractTest;

import com.sun.org.apache.xml.internal.serializer.ToSAXHandler;

/**正式员工
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 17:11
 * @Package 包名：cn.hss.object.abstractTest
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class SalariedEmployee extends Employee{
	private double monthlySalary;//月工资


	public SalariedEmployee(String name,Integer number,
	                        MyDate birthday,double monthlySalary) {
		super(name, number, birthday);
		this.monthlySalary = monthlySalary;
	}

	@Override
	public double earnings() {
		return monthlySalary;
	}

	@Override
	public String toString() {
		return "SalariedEmployee["+super.toString()+']';
	}

	public void setMonthlySalary(double monthlySalary) {
		this.monthlySalary = monthlySalary;
	}
}